package co.kr.hanbitedu.android.skeleton;

import java.util.Date;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Now extends Activity implements View.OnClickListener {
    Button btn;
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        btn = new Button(this);
        btn.setOnClickListener(this);
        updateTime();
        setContentView(btn);
    }
    
    public void onClick(View view) {
    	updateTime();
    }

	private void updateTime() {
		// TODO Auto-generated method stub
		btn.setText(new Date().toString());
	}
}